import { type Response } from "express";

import { Gateway, getGateway } from "@/droplet-bus/core.define";

import { app_gateway } from "./core.local";

export const UserWechatGateway: Gateway = getGateway(app_gateway, "stream_user_wechat");
export type doUserWeChatLoginDto = { codeOpen?: string; codeMp?: string };
export interface UserWeChatInterface {
  /** 通过微信登录（如果没有账户，就会创建账户）*/
  doUserWeChatLogin(dto: doUserWeChatLoginDto): Promise<{ SessionId: string }>;
}

export interface UserWeChatInterfaceInServer {
  /** 通过微信登录（如果没有账户，就会创建账户）*/
  doUserWeChatLogin(response: Response, dto: doUserWeChatLoginDto): Promise<{ SessionId: string }>;
}
